package net.devkit.core.module.sys.service;

import net.devkit.common.service.BaseServicer;
import net.devkit.common.toolkit.Pager;
import net.devkit.common.toolkit.retval.RetcodeGenerator;
import net.devkit.common.toolkit.retval.RetcodeWrapper;
import net.devkit.core.pojo.db.User;
import net.devkit.core.pojo.helper.PagerHelper;

public interface UserServicer extends BaseServicer<User,String> {

	/**
	 * 用户登录
	 * @param loginname
	 * @param passwd
	 * @return
	 */
	RetcodeWrapper<User> login(String loginname, String passwd);
	Long LOGIN_SUCCESS = RetcodeGenerator.next();
	Long LOGIN_FAILED_ACCOUNT_DISABLE = RetcodeGenerator.next();
	Long LOGIN_FAILED_PASSWD_ERROR = RetcodeGenerator.next();
	Long LOGIN_FAILED_LOGINNAME_NOTEXISTS = RetcodeGenerator.next();
	
	
	/**
	 * 分页查询用户
	 * @param helper
	 * @return
	 */
	Pager<User> findUserPager(PagerHelper helper);
	
	void moidfyUserInfo(User user);
}
